#ifndef __flat_H__
#define __flat_H__

#include <coordinate.h>
#include <fstream>
#include <iostream>
#include <sensor.h>
#include <string>
#include <tile.h>

using namespace std;

class Flat {
	Tile **flat;
	int flatHeight, flatWidth;

public:
	Flat();
	~Flat();

	const bool create(const string path);
	const bool create(istream&);
	void destroy();
	const bool check() const;

	const Coordinate getAvailableTile(const Coordinate&) const;
	const Coordinate getNextCoordinate(const Coordinate&) const;
	const bool isValidTile(const Coordinate&, Sensor) const;
	const bool isCovered() const;
	void setSensor(const Coordinate&, Sensor);
	void clearSensor(const Coordinate&);
};

#define FILE_WALL 0
#define FILE_TILE 1
#define FILE_IMPORTANT_TILE 2

#endif /* __flat_H__ */